import request from '@/utils/request'

// 查询客户信息列表
export function listInfo(query) {
  return request({
    url: '/customer/info/list',
    method: 'get',
    params: query
  })
}

// 查询客户信息详细
export function getInfo(customerInfId) {
  return request({
    url: '/customer/info/' + customerInfId,
    method: 'get'
  })
}

// 新增客户信息
export function addInfo(data) {
  return request({
    url: '/customer/info',
    method: 'post',
    data: data
  })
}

// 修改客户信息
export function updateInfo(data) {
  return request({
    url: '/customer/info',
    method: 'put',
    data: data
  })
}

// 删除客户信息
export function delInfo(customerInfId) {
  return request({
    url: '/customer/info/' + customerInfId,
    method: 'delete'
  })
}

// 导出客户信息
export function exportInfo(query) {
  return request({
    url: '/customer/info/export',
    method: 'get',
    params: query
  })
}

// 启用停用
export function changeInfoStatus(customerId,userStats){
  const data = {
    customerId,
    userStats
  }
  return request({
    url: '/customer/info/changeStatus',
    method: 'put',
    data: data
  })
}
